changes in new-allocation-card - #654
Open
conwelld wants to merge 18 commits into
Open
Conversation
fritzj2
requested changes
Jul 21, 2026
fritzj2
reviewed
Jul 21, 2026
Author
|
Thanks for looking into this. I have fixed the comments you have made (removed code from other branches and added comments to logic) |
fritzj2
reviewed
Jul 21, 2026
fritzj2
requested changes
Jul 21, 2026
Contributor
|
No logic file and tests needed yet because the logic related to pulling allocations and allocation utilization will be standardized by another team, whereupon this will have to be modified to use those functions. |
…everything touching the 202500
…rvice. See #657 but beyond that we created allo files
MImran2002
requested changes
Jul 22, 2026
MImran2002
requested changes
Jul 29, 2026
…tract countWorkers/getBreakHours with FormHistory approval filter, dynamic term in departmentPortal.html, and revert environment-specific path edits in base_data.py/demo_data.py. Add integration test coverage for the new logic functions.
…ve conflicts with the new Members card feature
…llocation.py, excluding denied forms from countWorkers and the used count. Update tests to cover the new behavior.
…wording, and aligned Primary/Secondary table Replace the raw "AY 2025-2026" term name with a computed current-semester label (e.g. "Fall 2025") derived from the term's own year and today's month, matching the Fall/Spring termCode convention used elsewhere. Reword ratios as "X of Y" instead of "X/Y", rename the card title to "Current Allocation", and rebuild the Primary/Secondary breakdown as a single table so every row (term info, headers, hour buckets, break hours) shares the same column alignment and stays legible down to mobile widths.
…ment-portal-base merge The base branch (department-portal-base) moved managePositions out of main_routes.py into its own departmentPortal.py with proper permission checks (commit ee19d87), but merging that branch in and accepting both sides left the old, now-dead copy in main_routes.py alongside the new file, so Flask registered two view functions under the same endpoint name and crashed on startup with "View function mapping is overwriting an existing endpoint function: main.managePositions". Remove the stale duplicate (it also referenced an unimported Tracy class) and the duplicate departmentPortal import in __init__.py from the same merge.
…s)" format and drop Break Hours
Match the supervisor's whiteboard mockup: each Primary/Secondary hour
bucket now reads as two lines ("10 hr: 2 contracts" / "(out of 5
allocations)") with correct singular/plural wording, via a small Jinja
macro to avoid repeating the format six times. Break Hours is removed
from the card entirely. Column alignment (left edges shared across the
term row, headers, and hour rows) is unchanged, and the pinch-zone
media query is retuned for the new, longer per-row text so nothing
clips or overflows at narrow widths.
MImran2002
requested changes
Aug 3, 2026
…solidated tests - Rename allocation_summary and its snake_case keys/locals to camelCase (allocationSummary, currentSemester, usedPositions, breakHours, used10, usedSecondary5, ...) across the logic, route, template, and tests - Shorten the getCurrentSemesterLabel docstring - Reword the card to Contracted/Allocated in both the tooltip and the position count - Stack Secondary below Primary (and the count below the term) on narrow cards by splitting the paired table into two, instead of shrinking the font - Point the not-yet-built View Allocations page at "#" like the Members card, so the button no longer 404s - Collapse the per-scenario tests into one test per function, drop the leading underscore from createFormHistory, and mark the unit test so run_tests.sh stops deselecting it - Cover the used-count denial filter and make the term filter and the getBreakHours other-term assertion actually meaningful - Revert unrelated whitespace/formatting churn in main_routes.py
MImran2002
requested changes
Aug 4, 2026
| "usedSecondary10": 0, | ||
| }, | ||
| "breakHours": 0, | ||
| } |
Contributor
There was a problem hiding this comment.
when Chris's allocationManager is merge you will have to revisit the logic
| @@ -1,4 +1,6 @@ | |||
|
|
|||
| export FLASK_APP="$(cd "$(dirname "$0")/.." && pwd)/app.py" | |||
Contributor
There was a problem hiding this comment.
i think you should remove this as touching tracy is out of your scope
| # Weekly-hours form (contractHours=None) - should be excluded regardless | ||
| formC = LaborStatusForm.create( | ||
| termCode=term, studentSupervisee=student, supervisor=supervisor, department=dept, | ||
| jobType="Primary", WLS="10", POSN_TITLE="Weekly Job", POSN_CODE="S022", |
Contributor
There was a problem hiding this comment.
when chris merge his logic in some of these test might become irrelevant so just to take notes and prepare for that
MImran2002
requested changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Allocation card revert merge
Changes
Testing